Compilation of Functional Languages Using Ow Graph Analysis
نویسندگان
چکیده
To implement lazy functional languages eeciently it is necessary for a compiler analyse many properties of the program. Analysis techniques proposed to support such implementations have a similar structure and each analysis is of suucient complexity that it requires a signiicant body of research to exploit to the full. We present ow graphs as a formal framework to support the diierent program analysis and synthesis techniques providing the structure for such a compiler. We have formally speciied a compiler for a lazy functional language and have also implemented it. The compiler accepts a simple functional language as input and generates C. In this paper we discuss the essentials of the formal speciication and present performance gures that demonstrate the eeciency of the compiler and of the code generated for a suite of medium size benchmark programs.
منابع مشابه
The GRIN Project: A Highly Optimising Back End for Lazy Functional Languages
Low level optimisations from conventional compiler technology often give very poor results when applied to code from lazy functional languages, mainly because of the completely diierent structure of the code, unknown control ow, etc. A novel approach to compiling laziness is needed. We describe a complete back end for lazy functional languages, which uses various interprocedural optimisations t...
متن کاملAn ML-Like Module System for the Synchronous Language SIGNAL
Synchronous languages such as Signal are best suited for the design of dependable real time systems Synchronous languages enable a very high level speci cation and an extremely modular implementation of com plex systems by structurally decomposing them into elementary synchronous processes Separate compilation in reactive languages is however made a dif cult issue by global safety requirements ...
متن کاملPr Esent Ee R Esum E
Control ow analysis is important in optimizing compilers of functional languages It strives to approximate at compile time dynamic function call graphs of program evaluation The precision of the approximation drives the e ciency of optimizations applied in compilers Control ow analysis can be expressed by both e ect systems and abstract interpretation My thesis work extends and combines these t...
متن کاملHigher-Order Value Flow Graphs
The concepts of value-and control-ow graphs are important for program analysis of imperative programs. An imperative value ow graph can be constructed by a single pass over the program text. No similar concepts exist for higher-order languages: we propose a method for constructing value ow graphs for typed higher-order functional languages. A higher-order value ow graph is constructed by a sing...
متن کاملControl ow analysis: a compilation paradigm for functional language
Revised version of "SAC 95" 31/08/95] Abstract Control ow analysis (cfa) is now well known but is not widely used in real compilers since optimizations that can be achieved via cfa are not so clear. This paper aims at showing that control ow analysis is very valuable in practice by presenting a fundamental optimization based on cfa: the closure representation algorithm, the essential optimizing...
متن کامل